import request from '@/config/axios'

// 乡镇上报患者信息
export const addPatient = (data: any) => {
  return request.post({ url: '/report/town/create', data })
}

// 乡镇列表查询
export const getReportPatient = (data: any) => {
  return request.post({ url: '/report/town/page', data })
}

// 修改上报患者信息
export const updatePatient = (data: any) => {
  return request.post({ url: '/report/town/updatePatientInfo', data })
}
  // 患者上报
export const reportPatient=(data: any) => {
   return request.post({ url: `/report/town/report`, data })
}

  // 患者撤回
  export const returnPatient=(data: any) => {
    return request.post({ url: `/report/town/return`, data })
 }

   // 删除患者
   export const deletePatient= (id: number) => {
     return request.delete({ url: `/report/town/delete?id=` + id })
   }
// 获得基本信息详情
export const getPatientDetail = async (id: string) => {
  return await request.get({ url: '/report/town/get?id='+id})
}


// 县级确定查询
export const getConfirmPatient = (data: any) => {
  return request.post({ url: '/report/county/page', data })
}

   // 县级删除患者
   export const deleteConfirmPatient= (id: number) => {
    return request.delete({ url: `/report/county/delete?id=` + id })
  }

  // 县级确定查询
export const updateConfirmPatient = (data: any) => {
  return request.post({ url: '/report/county/update', data })
}